label: Stop juggling cursors
authorMatthias Clasen <mclasen@redhat.com>
Thu, 18 Apr 2019 19:06:09 +0000 (15:06 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 18 Apr 2019 19:06:09 +0000 (15:06 -0400)
We have a convenience api for this.

gtk/gtklabel.c

index 859fa5059a0442a02a7de7bddc989ec3e4ef8116..05f2c8c5379e196a66a5c173fb43c56e6d8622c7 100644 (file)
@@ -4897,13 +4897,7 @@ gtk_label_set_selectable_hint (GtkLabel *label)
   widget = GTK_WIDGET (label);
 
   if (priv->select_info->selectable)
-    {
-      GdkCursor *cursor;
-
-      cursor = gdk_cursor_new_from_name ("text", NULL);
-      gtk_widget_set_cursor (widget, cursor);
-      g_object_unref (cursor);
-    }
+    gtk_widget_set_cursor_from_name (widget, "text");
 }
 
 #define GTK_TYPE_LABEL_CONTENT            (gtk_label_content_get_type ())